﻿<ViewBase:WindowBaseNotMainView x:Class="EzDesk.DesktopClient.OptionsModule.OptionsView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
                xmlns:ViewBase="clr-namespace:EzDesk.DesktopClient.ViewBase;assembly=EzDesk.DesktopClient.MVVMEnhance"
        Title="FunctionPageView"
        AllowsTransparency="True"
        WindowStyle="None" 
        Background="Transparent"
        WindowStartupLocation="Manual"
        Height="400" Width="388">

    <Border CornerRadius="5,5,0,0" BorderThickness="1" BorderBrush="{StaticResource BorderGray}" Background="White"  ScrollViewer.VerticalScrollBarVisibility="Hidden">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition   Height="Auto"></RowDefinition>
                <RowDefinition   Height="*"></RowDefinition>
                <RowDefinition Height="Auto"></RowDefinition>
            </Grid.RowDefinitions>
            <ContentControl Grid.Row="0" x:Name="TopContent" ></ContentControl>
            <ContentControl Grid.Row="1">
                <Grid Margin="5">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="10"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="10"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="获取新消息时间间隔" Grid.Row="0" Grid.Column="1"></TextBlock>
                    <StackPanel Grid.Row="0" Grid.Column="3"  Orientation="Horizontal">
                        <Slider x:Name="sldDuration"  Minimum="1" Maximum="30"  Width="200" Interval="1" Value="{Binding Path=ClientConfig.DurationOfGetFeed}" TickFrequency="1" SmallChange="1">
                            
                        </Slider>
                        <TextBlock >
                        <Run Text="{Binding Path=ClientConfig.DurationOfGetFeed}"></Run>
                        <Run Text="分钟" ></Run>
                        </TextBlock>
                    </StackPanel>

                    <TextBlock Text="显示消息数量"  Grid.Row="1" Grid.Column="1"></TextBlock>
                    <StackPanel Grid.Row="1" Grid.Column="3" Orientation="Horizontal">
                        <Slider  x:Name="sldFeedDisplayCount"  Minimum="5" Maximum="30" Width="200"   Value="{Binding Path=ClientConfig.FeedDisplayCount,Mode=TwoWay}"></Slider>
                        <TextBlock>
                        <Run Text="{Binding Path=ClientConfig.FeedDisplayCount,Mode=OneWay}"></Run>
                        <Run Text="条"></Run>
                        </TextBlock>
                    </StackPanel>
                    <CheckBox Content="显示已读消息"  Grid.Row="2" Grid.Column="1"  IsChecked="{Binding Path=ClientConfig.IsDisplayReadFeed}"></CheckBox>
                </Grid>
            </ContentControl>
            <ContentControl Grid.Row="2">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right">
                    <StackPanel.Resources>
                        <Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
                            <Setter Property="VerticalAlignment" Value="Bottom"></Setter>
                            <Setter Property="Margin" Value="2"></Setter>
                        </Style>
                    </StackPanel.Resources>
                    <Button Content="{StaticResource ResourceKey=OK}" Click="btnOK_Click"></Button>
                </StackPanel>
            </ContentControl>
        </Grid>
    </Border>
</ViewBase:WindowBaseNotMainView>

